package org.suze.springboot.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.suze.springboot.base.op.OpResult;
import org.suze.springboot.base.op.OpResultCommon;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @Date : 上午9:44 2017/9/12
 * @Author : 石冬冬-Heil Hitler(dongdong.shi@mljr.com)
 */
@Controller
@RequestMapping("/prop")
public class PropController {
    private static final Logger logger = LoggerFactory.getLogger(PropController.class);

    //@Value("#{application['spring.redis.timeout']}")
    private String maxTotal;

    @ResponseBody
    @RequestMapping("show")
    public OpResult<Map<String,Object>> say(){
        Map<String,Object> param = new HashMap<String,Object>(){{
            this.put("maxTotal",maxTotal);
        }};
        logger.info("maxTotal={}",maxTotal);
        return OpResultCommon.suc(param);
    }

}
